<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<s:layout-render name="/layout_template.jsp" nadpis="user.login">
    <s:layout-component name="telo">
        <s:useActionBean beanclass="cz.muni.fi.pa165.carparkweb.actionbeans.AuthorizationActionBean" var="actionBean"/>        

        <c:if test="${not empty actionBean.error}">
            <h3 style="color: red"><f:message key="login.credentials" /></h3>
        </c:if> 

        <c:url value="/j_spring_security_check" var="checkUrl"/>
        <form action="${checkUrl}" method="POST">
            <div class="row">                
                <label class="col1" for="inputUsername"><f:message key="login.username" /></label>
                <span class="col2"><input type="text" id="inputUsername" name="j_username" placeholder="username"></span>
            </div>
            <div class="row">                
                <label  class="col1" for="inputPassword"><f:message key="login.password" /></label>                
                <span class="col2"><input type="password" id="inputPassword" name="j_password" placeholder="password"></span>                
            </div>
            <div class="row">                
                <button type="submit"><f:message key="user.login"/></button>                
            </div>
        </form>
    </s:layout-component>
</s:layout-render>
